﻿using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using SmartCity.Shared;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc;

namespace CommonManagement
{
    /// <summary>
    /// 省份控制器
    /// </summary>
    [RemoteService]
    [Area("commonManagement")]
    [Route("api/commonManagement/gps")]
    public class ProvinceController : AbpController, IProvinceAppService
    {
        private readonly IProvinceAppService _provinceAppService;

        public ProvinceController(
            IProvinceAppService provinceAppService)
        {
            _provinceAppService = provinceAppService;
        }

        // 1.8.4 获取全国省份
        [HttpGet]
        [Route("province")]
        public Task<ResultResponse<IList<ProvinceDto>>> ListAsync(string name = null)
        {
            return _provinceAppService.ListAsync(name);
        }
    }
}